package com.spark.incoicings.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spark.invoicings.entity.OrderDetail;
import com.spark.invoicings.entity.SalesOrder;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {

    /**
     * 根据id查询销售订单
     * @param id
     * @return
     */
    SalesOrder selectOrderDetailsSalesById(Integer id);

    /**
     * 根据销售订单id查询所属销售订单明细
     * @param id
     * @return
     */
    List<OrderDetail> selectOrderDetailsSalesByIds(Integer id);

    /**
     * 查询所有订单明细
     * @return
     */
    List<OrderDetail> selectOrderDetails();

}
